import request from '@/utils/request'

// 查询时间阈值规则列表
export function listTime(query) {
  return request({
    url: '/vehicleDispatch/time/list',
    method: 'get',
    params: query
  })
}

// 查询时间阈值规则详细
export function getTime(ruleId) {
  return request({
    url: '/vehicleDispatch/time/' + ruleId,
    method: 'get'
  })
}

// 新增时间阈值规则
export function addTime(data) {
  return request({
    url: '/vehicleDispatch/time',
    method: 'post',
    data: data
  })
}

// 修改时间阈值规则
export function updateTime(data) {
  return request({
    url: '/vehicleDispatch/time',
    method: 'put',
    data: data
  })
}

// 删除时间阈值规则
export function delTime(ruleId) {
  return request({
    url: '/vehicleDispatch/time/' + ruleId,
    method: 'delete'
  })
}
